Advances in technology have resulted in smaller and more powerful computing devices. For example, there currently exist a variety of portable personal computing devices, including wireless computing devices, such as portable wireless telephones, personal digital assistants (PDAs), tablet computers, and paging devices that are small, lightweight, and easily carried by users. Many such computing devices include other devices that are incorporated therein. For example, a wireless telephone can also include a digital still camera, a digital video camera, a digital recorder, and an audio file player. Also, such computing devices can process executable instructions, including software applications, such as a web browser application that can be used to access the Internet and multimedia applications that utilize a still or video camera and provide multimedia playback functionality. As such, these devices can perform functions typically performed by larger devices, such as desktop computers.
Some electronic devices may include multiple processors. For example, a mobile phone may include a central processing unit (CPU) (sometimes referred to as an application processor) and a digital signal processor (DSP). Each processor may be better suited than the other processor(s) to perform certain computation tasks. For example, the CPU, which may act as the primary processor and may execute a mobile phone operating system, may be more efficient in executing “control code,” such as web browser and spreadsheet code. On the other hand, the DSP may be more efficient than the CPU when executing signal processing and other math-intensive functions.
Different processors may be optimized for different workloads and may have different architectures (e.g., instruction sets). For example, a phone may include a CPU implemented according to a first architecture and a DSP implemented according to a second architecture. Because the different processors have different architectures, each processor may execute its own operating system. Even if the same operating system is executed on the processors, each processor functions as a separate machine executing its own operating system instance. Due to the differences in architecture, the two operating system instances may be unable to share data and offload processing tasks to one another. Additionally, memory is allocated from each environment, rather than from a shared pool.
As mobile applications become more complex, certain applications, or threads thereof, may be better suited for CPU execution or DSP execution. However, because the CPU and DSP execute different operating systems, the phone may be forced to execute an application (and each thread thereof) on only the CPU or only the DSP. As a result, mobile applications are conventionally developed for CPUs and do not attempt to leverage the processing capabilities of other available processors, such as DSPs.
In the personal computing area, some software vendors have attempted to address the use of different architectures in different computers by providing “universal” binaries (also referred to as “fat” binaries). Generally, a universal binary includes a different version of the same software for each of multiple architectures. During installation or execution of the universal binary at a particular computer, the appropriate version of the software is identified and installed or executed based on the architecture of the particular computer. However, because only a single architecture is present on each computer, universal binaries do not offer a way to concurrently execute the same software instance using processors having different architectures. In addition, it may be difficult to implement and process data structures that are to be shared between the processors.